package com.wxzz.elearning.common.bean;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class BaseEntity extends Model<BaseEntity> implements Serializable {

    //@TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键id,修改操作时必填")
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", hidden = true)
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间", hidden = true)
    private LocalDateTime updateTime;

    @TableLogic
    @ApiModelProperty(value = "逻辑删除 0-未删除 1-已删除", hidden = true)
    private Integer deleted;
}
